home *** CD-ROM | disk | FTP | other *** search
- /*
- * Copyright (C) 1994, Silicon Graphics, Inc.
- * All Rights Reserved.
- *
- * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
- * the contents of this file may not be disclosed to third parties, copied or
- * duplicated in any form, in whole or in part, without the prior written
- * permission of Silicon Graphics, Inc.
- *
- * RESTRICTED RIGHTS LEGEND:
- * Use, duplication or disclosure by the Government is subject to restrictions
- * as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
- * and Computer Software clause at DFARS 252.227-7013, and/or in similar or
- * successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
- * rights reserved under the Copyright Laws of the United States.
- */
- // -*- C++ -*-
-
- /*
- * Copyright (C) 1994 Silicon Graphics, Inc.
- *
- _______________________________________________________________________
- ______________ S I L I C O N G R A P H I C S I N C . ____________
- |
- | $Revision: 1.0 $
- |
- | Description:
- | This file contains the declaration of an engine
- | that calculates a surface of revolution
- | linkages
- |
- | Classes:
- | RevoSurfEngine
- |
- | Author(s) : Paul Isaacs
- |
- ______________ S I L I C O N G R A P H I C S I N C . ____________
- _______________________________________________________________________
- */
-
- #ifndef __REVO_SURF_ENGINE_
- #define __REVO_SURF_ENGINE_
-
- #include <Inventor/engines/SoSubEngine.h>
- #include <Inventor/fields/SoMFLong.h>
- #include <Inventor/fields/SoMFVec3f.h>
- #include <Inventor/fields/SoSFFloat.h>
- #include <Inventor/fields/SoSFVec3f.h>
-
- /////////////////////////////////////////////////////////////
- // RevoSurfEngine
- //
- //
- /////////////////////////////////////////////////////////////
- class RevoSurfEngine : public SoEngine {
- SO_ENGINE_HEADER(RevoSurfEngine);
- public:
-
- RevoSurfEngine();
-
- // Inputs:
- SoSFVec3f axisPt1; // 2 points define axis to revolve around.
- SoSFVec3f axisPt2;
- SoMFVec3f profileCoords; // Coords that will rotate about the axis.
- SoSFFloat angle; // Angle between points around circle.
-
- // Outputs:
- // Grid of coordinates that comprise the surface
- SoEngineOutput gridOfCoords; // (SoMFVec3f)
-
- // You can connect this output to the coordIndex of an SoIndexedFaceSet.
- SoEngineOutput faceIndices; // (SoMFLong)
-
- SoINTERNAL public:
- static void initClass();
- private:
- ~RevoSurfEngine();
- virtual void evaluate();
-
- void loadFaceIndices( long numRows, long numCols );
-
- SoMFVec3f scratchVecField;
-
- long oldVertsPerCol, oldVertsPerRow;
- };
-
- #endif /* __REVO_SURF_ENGINE_ */
-